﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Sita.Data.Context;
using Sita.Entities;

namespace Sita.Data.Repositories
{
    public class UserRepository : GenericRepository<User>
    {
        public UserRepository() :
            base(new SitaContext())
        { }

        public User GetByUserName(string userName)
        {
            SitaContext _context = new SitaContext();
            User user = _context.Users.Where(u => u.Username == userName).SingleOrDefault();
            return user;
        }

    }
}
